package com.esun.cheetah.view.personal.sportlotteryfootball;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.esun.cheetah.R;
import com.esun.cheetah.biz.personal.personalinfo.UserInfo;
import com.esun.cheetah.view.personal.lotteryrecord.LotteryRecordAgp;
import com.esun.cheetah.view.personal.lotteryrecord.LotteryRecordDetailFootballAct;

/**
 * 
 * @Package com.esun.cheetah.view.personal.sportlotteryfootball.BetSuccess
 * @ClassName: BetSuccess
 * @Description: TODO(bet success activity)
 * @author handy <br/>
 * @date create at 2012-7-31 下午2:47:36
 *
 */
 
public class BetSuccess extends Activity implements OnClickListener {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		// requestWindowFeature(Window.FEATURE_NO_TITLE);
		// getWindow().setFlags(WindowManager.LayoutParams. FLAG_FULLSCREEN ,
		// WindowManager.LayoutParams. FLAG_FULLSCREEN);
		setContentView(R.layout.betsuccess);

		((Button) this.findViewById(R.id.withdrawal_tip_act_btn_goBack))
				.setOnClickListener(this);
		((Button) this.findViewById(R.id.btn_fangan)).setOnClickListener(this);
		((Button) this.findViewById(R.id.btn_bet)).setOnClickListener(this);
		((TextView) this.findViewById(R.id.touzhujine)).setText(UserInfo
				.getUserInfo().getTouzhuMoney());
		((TextView) this.findViewById(R.id.zhanghuyue)).setText(UserInfo
				.getUserInfo().getMoney());
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.withdrawal_tip_act_btn_goBack:
			this.finish();
			break;

		case R.id.btn_fangan:
			Intent fanganinIntent = new Intent();
			Bundle bundle = new Bundle();
			bundle.putString("lotid", "46");
			bundle.putString("id", UserInfo.getUserInfo().getPid());
			fanganinIntent.putExtras(bundle);
			fanganinIntent.setClass(BetSuccess.this,
					LotteryRecordDetailFootballAct.class);
			startActivity(fanganinIntent);
			BetSuccess.this.finish();
			break;

		case R.id.btn_bet:
			Intent betinIntent = new Intent();
			betinIntent.setClass(BetSuccess.this, LotteryRecordAgp.class);
			startActivity(betinIntent);
//			BetSuccess.this.finish();
			break;

		default:
			break;
		}

	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();
		// this.unregisterReceiver(ConnectionChangeReceiver.getConnectionChangeReceiver());
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		// this.registerReceiver(ConnectionChangeReceiver.getConnectionChangeReceiver(),
		// ConnectionChangeReceiver.getIntentFilter());
	}
}
